<?php
define("NO_LOGIN",1);
require("global.php");
$themeid = intval($phprpg->input['theme']);
$name = $db->escape($phprpg->input['name']);
$getStylesheet = $db->select("stylesheets","*","theme={$themeid} AND name='{$name}'");
if($db->recordcount($getStylesheet) == 1){
	$s = $db->fetchrow($getStylesheet);
	header("Content-type: text/css");
	echo str_ireplace('[THEME_IMAGES]', $phprpg->settings['gameurl'].$theme['imagedir'], $s['css']);
}else{
	echo "Stylesheet doesn't exist.";
}
?>